package com.burstly.lib.feature;

import android.content.res.AssetManager;
import com.burstly.lib.util.LoggerExt;
import com.h2.org.springframework.beans.factory.ResourceResolver;
import java.io.File;
import java.io.IOException;
import org.springframework.util.AntPathMatcher;

final class AssetResourceResolver extends ResourceResolver
{
  private static final LoggerExt LOG = LoggerExt.getInstance();
  private static final String TAG = "AssetResourceResolver";
  private AssetManager mAssetManager;

  protected String resolveClassPath(String paramString, boolean paramBoolean)
  {
    try
    {
      if ((paramString.startsWith("/")) || (paramString.startsWith("\\")))
        return resolveClassPathHelper(paramString.substring(1), "", paramBoolean);
      String str = resolveClassPathHelper(paramString, "", paramBoolean);
      return str;
    }
    catch (IOException localIOException)
    {
      LOG.logThrowable("AssetResourceResolver", localIOException);
    }
    return paramString;
  }

  protected String resolveClassPathHelper(String paramString1, String paramString2, boolean paramBoolean)
    throws IOException
  {
    String[] arrayOfString = this.mAssetManager.list(paramString2);
    AntPathMatcher localAntPathMatcher = new AntPathMatcher();
    Object localObject = null;
    int i = arrayOfString.length;
    for (int j = 0; ; j++)
      if (j < i)
      {
        String str1 = arrayOfString[j];
        if ("".equals(paramString2));
        for (String str2 = str1; localAntPathMatcher.matchStart(paramString1, str2); str2 = paramString2 + File.separatorChar + str1)
        {
          localObject = str2;
          if (this.mAssetManager.list(str1).length == 0)
            break label138;
          return resolveClassPathHelper(paramString1, str2, paramBoolean);
        }
        if (paramBoolean)
          localObject = resolveClassPathHelper(paramString1, str2, paramBoolean);
        label138: if (localObject == null);
      }
      else
      {
        return localObject;
      }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.feature.AssetResourceResolver
 * JD-Core Version:    0.6.2
 */